package com.sg.controller.bff;

import com.sg.service.biz.bff.MemberService;
import com.sg.dto.biz.bff.req.*;
import com.sg.dto.biz.bff.res.*;
import com.sg.common.ro.OkrResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：
 * @version 1.0
 * @date ：
 */
@Api(value = "Member", tags = {"Member"})
@RestController
// @RequestMapping("/oms/member/")
public class MemberController {

    @Autowired
    MemberService memberService;

    /**
     * B1-2新增员工身份人员（管理）
     * gen by moon at 8/31/2022, 5:25:11 PM
     */
    @PostMapping("/oms/mgt/member/addStaffBeginMember")
    @ApiOperation(value = "B1-2新增员工身份人员（管理）", response = OkrResult.class)
    public OkrResult<BffAddStaffBeginMemberRespDto> addStaffBeginMember(@RequestBody(required = false) @Validated BffAddStaffBeginMemberReqDto reqDTO) {
        return OkrResult.success(memberService.addStaffBeginMember(reqDTO));
    }


    /**
     * B1-2查询角色人员列表（管理）
     * gen by moon at 8/10/2022, 3:30:14 AM
     */
    @PostMapping("/oms/mgt/member/queryRoleRelList")
    @ApiOperation(value = "B1-2查询角色人员列表（管理）", response = OkrResult.class)
    public OkrResult<BffQueryRoleRelListRespDto> queryRoleRelList(@RequestBody(required = false) @Validated BffQueryRoleRelListReqDto reqDTO) {
        return OkrResult.success(memberService.queryRoleRelList(reqDTO));
    }

    /**
     * B1-2查询员工身份人员列表（管理）
     * gen by moon at 8/10/2022, 3:33:22 AM
     */
    @PostMapping("/oms/mgt/member/queryStaffBeginMemberList")
    @ApiOperation(value = "B1-2查询员工身份人员列表（管理）	", response = OkrResult.class)
    public OkrResult<BffQueryStaffBeginMemberListRespDto> queryStaffBeginMemberList(@RequestBody(required = false) @Validated BffQueryStaffBeginMemberListReqDto reqDTO) {
        return OkrResult.success(memberService.queryStaffBeginMemberList(reqDTO));
    }

    /**
     * B查询个人面板详情（公共）
     * gen by moon at 8/22/2022, 10:22:40 PM
     */
    @PostMapping("/oms/member/queryStaffBeginMemberInfoDetail")
    @ApiOperation(value = "B查询个人面板详情（公共）", response = OkrResult.class)
    public OkrResult<BffQueryStaffBeginMemberInfoDetailRespDto> queryStaffBeginMemberInfoDetail(@RequestBody(required = false) @Validated BffQueryStaffBeginMemberInfoDetailReqDto reqDTO) {
        return OkrResult.success(memberService.queryStaffBeginMemberInfoDetail(reqDTO));
    }

    /**
     * B1-2查询组织下成员列表（边界）
     * gen by moon at 8/31/2022, 7:28:16 PM
     */
    @PostMapping("/oms/member/queryOrgMemberList")
    @ApiOperation(value = "B1-2查询组织下成员列表（边界）", response = OkrResult.class)
    public OkrResult<BffQueryOrgMemberListRespDto> queryOrgMemberList(@RequestBody(required = false) @Validated BffQueryOrgMemberListReqDto reqDTO) {
        return OkrResult.success(memberService.queryOrgMemberList(reqDTO));
    }

    /**
     * B1-2查询角色人员列表（边界）
     * gen by moon at 11/1/2022, 8:19:02 AM
     */
    @PostMapping("/oms/member/queryRoleRelListBorder")
    @ApiOperation(value = "B1-2查询角色人员列表（边界）", response = OkrResult.class)
    public OkrResult<BffQueryRoleRelListBorderRespDto> queryRoleRelListBorder(@RequestBody(required = false) @Validated BffQueryRoleRelListBorderReqDto reqDTO) {
        return OkrResult.success(memberService.queryRoleRelListBorder(reqDTO));
    }

    /**
     * B1-2取消设员工无效（管理）
     * gen by moon at 8/10/2022, 3:34:40 AM
     */
    @PostMapping("/oms/mgt/member/cancelIsinvalidSetStaffMember")
    @ApiOperation(value = "B1-2取消设员工无效（管理）", response = OkrResult.class)
    public OkrResult<BffCancelIsinvalidSetStaffMemberRespDto> cancelIsinvalidSetStaffMember(@RequestBody(required = false) @Validated BffCancelIsinvalidSetStaffMemberReqDto reqDTO) {
        return OkrResult.success(memberService.cancelIsinvalidSetStaffMember(reqDTO));
    }

    /**
     * B1-2查询角色人员详情（管理）
     * gen by moon at 9/12/2022, 6:27:05 PM
     */
    @PostMapping("/oms/mgt/member/queryRoleRelDetail")
    @ApiOperation(value = "B1-2查询角色人员详情（管理）", response = OkrResult.class)
    public OkrResult<BffQueryRoleRelDetailRespDto> queryRoleRelDetail(@RequestBody(required = false) @Validated BffQueryRoleRelDetailReqDto reqDTO) {
        return OkrResult.success(memberService.queryRoleRelDetail(reqDTO));
    }

    /**
     * B1-新增角色人员（管理）
     * gen by moon at 8/31/2022, 12:18:22 AM
     */
    @PostMapping("/oms/mgt/member/addRoleRel")
    @ApiOperation(value = "B1-新增角色人员（管理）", response = OkrResult.class)
    public OkrResult<BffAddRoleRelRespDto> addRoleRel(@RequestBody(required = false) @Validated BffAddRoleRelReqDto reqDTO) {
        return OkrResult.success(memberService.addRoleRel(reqDTO));
    }

    /**
     * B1-2设员工无效（管理）
     */
    @PostMapping("/oms/mgt/member/inValidIsinvalidSetStaffMember")
    @ApiOperation(value = "B1-2设员工无效（管理）", response = OkrResult.class)
    public OkrResult<BffInValidIsinvalidSetStaffMemberRespDto> inValidIsinvalidSetStaffMember(@RequestBody(required = false) @Validated BffInValidIsinvalidSetStaffMemberReqDto reqDTO) {
        return OkrResult.success(memberService.inValidIsinvalidSetStaffMember(reqDTO));
    }

    /**
     * B1-2查询去重部门员工列表（管理）
     * gen by moon at 8/10/2022, 3:35:04 AM
     */
    @PostMapping("/oms/mgt/member/queryFilterDeptSatffList")
    @ApiOperation(value = "B1-2查询去重部门员工列表（管理）", response = OkrResult.class)
    public OkrResult<BffQueryFilterDeptSatffListRespDto> queryFilterDeptSatffList(@RequestBody(required = false) @Validated BffQueryFilterDeptSatffListReqDto reqDTO) {
        return OkrResult.success(memberService.queryFilterDeptSatffList(reqDTO));
    }

    /**
     * B1-2查询组织员工列表（边界）
     * gen by moon at 8/10/2022, 3:33:24 AM
     */
    @PostMapping("/oms/member/queryOrgStaffList")
    @ApiOperation(value = "B1-2查询组织员工列表（边界）", response = OkrResult.class)
    public OkrResult<BffQueryOrgStaffListRespDto> queryOrgStaffList(@RequestBody(required = false) @Validated BffQueryOrgStaffListReqDto reqDTO) {
        return OkrResult.success(memberService.queryOrgStaffList(reqDTO));
    }

    /**
     * B1-2查询员工去重角色人员列表（管理）
     * gen by moon at 8/10/2022, 3:32:15 AM
     */
    @PostMapping("/oms/mgt/member/queryStaffFilterRoleRelList")
    @ApiOperation(value = "B1-2查询员工去重角色人员列表（管理）", response = OkrResult.class)
    public OkrResult<BffQueryStaffFilterRoleRelListRespDto> queryStaffFilterRoleRelList(@RequestBody(required = false) @Validated BffQueryStaffFilterRoleRelListReqDto reqDTO) {
        return OkrResult.success(memberService.queryStaffFilterRoleRelList(reqDTO));
    }

    /**
     * B1-2修改身份人员资料（管理）
     * gen by moon at 8/27/2022, 3:00:36 PM
     */
    @PostMapping("/oms/mgt/member/updateBeginMembInfo")
    @ApiOperation(value = "B1-2修改身份人员资料（管理）", response = OkrResult.class)
    public OkrResult<BffUpdateBeginMembInfoRespDto> updateBeginMembInfo(@RequestBody(required = false) @Validated BffUpdateBeginMembInfoReqDto reqDTO) {
        return OkrResult.success(memberService.updateBeginMembInfo(reqDTO));
    }

    /**
     * B1-3取消异动员工身份人员
     * gen by moon at 8/10/2022, 3:37:05 AM
     */
    @PostMapping("/oms/mgt/member/cancelTransactionStaffBeginMember")
    @ApiOperation(value = "B1-3取消异动员工身份人员", response = OkrResult.class)
    public OkrResult<BffCancelTransactionStaffBeginMemberRespDto> cancelTransactionStaffBeginMember(@RequestBody(required = false) @Validated BffCancelTransactionStaffBeginMemberReqDto reqDTO) {
        return OkrResult.success(memberService.cancelTransactionStaffBeginMember(reqDTO));
    }

    /**
     * B1-3设异动员工身份人员
     * gen by moon at 8/10/2022, 3:37:01 AM
     */
    @PostMapping("/oms/mgt/member/inTransactionStaffBeginMember")
    @ApiOperation(value = "B1-3设异动员工身份人员", response = OkrResult.class)
    public OkrResult<BffInTransactionStaffBeginMemberRespDto> inTransactionStaffBeginMember(@RequestBody(required = false) @Validated BffInTransactionStaffBeginMemberReqDto reqDTO) {
        return OkrResult.success(memberService.inTransactionStaffBeginMember(reqDTO));
    }

    /**
     * B1-3存档员工身份人员
     * gen by moon at 8/10/2022, 3:36:57 AM
     */
    @PostMapping("/oms/mgt/member/archiveBeginMember")
    @ApiOperation(value = "B1-3存档员工身份人员", response = OkrResult.class)
    public OkrResult<BffArchiveBeginMemberRespDto> archiveBeginMember(@RequestBody(required = false) @Validated BffArchiveBeginMemberReqDto reqDTO) {
        return OkrResult.success(memberService.archiveBeginMember(reqDTO));
    }

    /**
     * B1-2修改角色人员备注（管理）
     * gen by moon at 8/21/2022, 4:22:32 AM
     */
    @PostMapping("/oms/mgt/member/updateRoleRelNote")
    @ApiOperation(value = "B1-2修改角色人员备注（管理）", response = OkrResult.class)
    public OkrResult<BffUpdateRoleRelNoteRespDto> updateRoleRelNote(@RequestBody(required = false) @Validated BffUpdateRoleRelNoteReqDto reqDTO) {
        return OkrResult.success(memberService.updateRoleRelNote(reqDTO));
    }

    /**
     * B1-2查询员工身份人员详情（管理）
     * gen by moon at 9/1/2022, 5:34:15 PM
     */
    @PostMapping("/oms/member/queryStaffBeginMemberDetail")
    @ApiOperation(value = "B1-2查询员工身份人员详情（管理）", response = OkrResult.class)
    public OkrResult<BffQueryStaffBeginMemberDetailRespDto> queryStaffBeginMemberDetail(@RequestBody(required = false) @Validated BffQueryStaffBeginMemberDetailReqDto reqDTO) {
        return OkrResult.success(memberService.queryStaffBeginMemberDetail(reqDTO));
    }

    /**
     * B1-存档角色人员（管理）
     * gen by moon at 9/16/2022, 5:19:29 AM
     */
    @PostMapping("/oms/mgt/member/archiveRoleRel")
    @ApiOperation(value = "B1-存档角色人员（管理）", response = OkrResult.class)
    public OkrResult<BffArchiveRoleRelRespDto> archiveRoleRel(@RequestBody(required = false) @Validated BffArchiveRoleRelReqDto reqDTO) {
        return OkrResult.success(memberService.archiveRoleRel(reqDTO));
    }

    /**
     * B1-2查询部门直属员工列表（边界）-备用
     */
    @PostMapping("/oms/member/queryDeptDirectStaffList")
    @ApiOperation(value = "B1-2查询部门直属员工列表（边界）-备用", response = OkrResult.class)
    public OkrResult<BffQueryDeptDirectStaffListRespDto> queryDeptDirectStaffList(@RequestBody(required = false) @Validated BffQueryDeptDirectStaffListReqDto reqDTO) {
        return OkrResult.success(memberService.queryDeptDirectStaffList(reqDTO));
    }

    /**
     * B1-2存档部门管理员（边界）
     * gen by moon at 8/10/2022, 3:36:05 AM
     */
    @PostMapping("/oms/mgt/member/archiveDeptAdminRoleRel")
    @ApiOperation(value = "B1-2存档部门管理员（边界）", response = OkrResult.class)
    public OkrResult<BffArchiveDeptAdminRoleRelRespDto> archiveDeptAdminRoleRel(@RequestBody(required = false) @Validated BffArchiveDeptAdminRoleRelReqDto reqDTO) {
        return OkrResult.success(memberService.archiveDeptAdminRoleRel(reqDTO));
    }

    /**
     * B1-2新增部门管理员（边界）
     * gen by moon at 8/10/2022, 3:36:01 AM
     */
    @PostMapping("/oms/mgt/member/addDeptAdminRoleRel")
    @ApiOperation(value = "B1-2新增部门管理员（边界）", response = OkrResult.class)
    public OkrResult<BffAddDeptAdminRoleRelRespDto> addDeptAdminRoleRel(@RequestBody(required = false) @Validated BffAddDeptAdminRoleRelReqDto reqDTO) {
        return OkrResult.success(memberService.addDeptAdminRoleRel(reqDTO));
    }

    /**
     * B1-2查询员工身份人员详情（边界）
     */
    @PostMapping("/oms/member/queryBeginMemberDetail")
    @ApiOperation(value = "B1-2查询员工身份人员详情（边界）", response = OkrResult.class)
    public OkrResult<BffQueryBeginMemberDetailRespDto> queryBeginMemberDetail(@RequestBody(required = false) @Validated BffQueryBeginMemberDetailReqDto reqDTO) {
        return OkrResult.success(memberService.queryBeginMemberDetail(reqDTO));
    }

    /**
     * B1-2删除部门管理员（管理）
     * gen by moon at 8/10/2022, 3:33:06 AM
     */
    @PostMapping("/oms/mgt/member/deleteDeptAdminRoleRel")
    @ApiOperation(value = "B1-2删除部门管理员（管理）", response = OkrResult.class)
    public OkrResult<BffDeleteDeptAdminRoleRelRespDto> deleteDeptAdminRoleRel(@RequestBody(required = false) @Validated BffDeleteDeptAdminRoleRelReqDto reqDTO) {
        return OkrResult.success(memberService.deleteDeptAdminRoleRel(reqDTO));
    }

    /**
     * B1-2删除角色人员（管理）
     * gen by moon at 10/15/2022, 5:53:18 PM
     */
    @PostMapping("/oms/mgt/member/deleteRoleRel")
    @ApiOperation(value = "B1-2删除角色人员（管理）", response = OkrResult.class)
    public OkrResult<BffDeleteRoleRelRespDto> deleteRoleRel(@RequestBody(required = false) @Validated BffDeleteRoleRelReqDto reqDTO) {
        return OkrResult.success(memberService.deleteRoleRel(reqDTO));
    }

    /**
     * B1-2查询部门管理员列表（管理）
     * gen by moon at 8/10/2022, 3:32:25 AM
     */
    @PostMapping("/oms/mgt/member/queryDeptAdminRoleRelList")
    @ApiOperation(value = "B1-2查询部门管理员列表（管理）", response = OkrResult.class)
    public OkrResult<BffQueryDeptAdminRoleRelListRespDto> queryDeptAdminRoleRelList(@RequestBody(required = false) @Validated BffQueryDeptAdminRoleRelListReqDto reqDTO) {
        return OkrResult.success(memberService.queryDeptAdminRoleRelList(reqDTO));
    }

    /**
     * B1-2设置员工无效(管理)
     * gen by moon at 8/10/2022, 3:31:43 AM
     */
    @PostMapping("/oms/mgt/member/setInvalidStaffMember")
    @ApiOperation(value = "B1-2设置员工无效(管理)", response = OkrResult.class)
    public OkrResult<BffSetInvalidStaffMemberRespDto> setInvalidStaffMember(@RequestBody(required = false) @Validated BffSetInvalidStaffMemberReqDto reqDTO) {
        return OkrResult.success(memberService.setInvalidStaffMember(reqDTO));
    }

    /**
     * B1-2批量查业务角色人员(管理)(边界)
     * gen by moon at 10/8/2022, 3:09:31 AM
     */
    @PostMapping("/oms/mgt/member/batchQueryBizRoleRelBorder")
    @ApiOperation(value = "B1-2批量查业务角色人员(管理)(边界)", response = OkrResult.class)
    public OkrResult<BffBatchQueryBizRoleRelBorderRespDto> batchQueryBizRoleRelBorder(@RequestBody(required = false) @Validated BffBatchQueryBizRoleRelBorderReqDto reqDTO) {
        return OkrResult.success(memberService.batchQueryBizRoleRelBorder(reqDTO));
    }

    /**
     * B1-2查询字母身份人员列表(管理)
     * gen by moon at 9/14/2022, 10:18:22 PM
     */
    @PostMapping("/oms/mgt/member/queryLetterBeginMemberList")
    @ApiOperation(value = "B1-2查询字母身份人员列表(管理)", response = OkrResult.class)
    public OkrResult<BffQueryLetterBeginMemberListRespDto> queryLetterBeginMemberList(@RequestBody(required = false) @Validated BffQueryLetterBeginMemberListReqDto reqDTO) {
        return OkrResult.success(memberService.queryLetterBeginMemberList(reqDTO));
    }
}
